module.exports = function(env,argv){
    env = env || {};
    return {
        entry:'./src/index',
        //  放置模块 插件 loader
        module:{
            // 规则全是json
            rules:[
                // test:用什么样的规则  use:用什么模块
                {test:/\.css$/,use:['style-loader','css-loader','postcss-loader']},
                {test:/\.(eot|svg|ttf|woff|woff2)$/i,use:'file-loader'}
            ]
        },
        resolve:{
            alias:{
                'vue':'vue/dist/vue.esm' //别名 不用引的时候引一串
            }
        },
        ...env.development?require('./config/webpack.development'):require('./config/webpack.production')
    }
}